package com.macro.mall.portal.controller;

import com.macro.mall.portal.service.SyntonyService;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/alipay")
public class SyntonyController {
    @Autowired
    private SyntonyService service;

    @Operation(summary = "支付宝回调接口")
    @RequestMapping(value = "/pay", method = RequestMethod.POST)
    public String pay(HttpServletRequest request,
                    @RequestParam Map<String, String> allParams) {
       return service.pay(request,allParams);

    }
}
